<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
	<head>
		<!-- atributos html -->
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="SHORTCUT ICON" href="img/favicon.png" />
		<link rel="shortcut icon" href="img/favicon.png" type="image/x-icon"/>
		<link rel="icon" href="img/favicon.png" type="image/x-icon"/>
		<title>Educa - Sistema de Gerenciamento para Colégio Militar</title>
		<!-- js -->
		<script type="text/javascript" src="js/jquery/jquery.js" ></script>
		<script type="text/javascript" src="js/validationEngine/jquery.validationEngine-pt.js" ></script>
		<script type="text/javascript" src="js/validationEngine/jquery.validationEngine.js" ></script>
		<script type="text/javascript" src="js/blockUIPlugin/jquery.blockUI.min.js" ></script>
		<script type="text/javascript" src="js/digitalbush/jquery.maskedinput-1.3.min.js" ></script>
		<script type="text/javascript" src="tela/entrar/entrar.js" ></script>
		<!-- css -->
		<link rel="stylesheet" type="text/css" href="css/validationEngine/validationEngine.jquery.css"/>
		<link rel="stylesheet" type="text/css" href="tela/entrar/entrar.css" type="text/css"/>
	</head>
	<body> 
<!-- 		<img src="img/mj-top-right.png" id="mj-top-right" /> -->
			<form id="formID" name="f" action="resources/j_spring_security_check" method="POST">
				
				<div id="login-box">
					<H2>Entrar</H2>
					
					Educa - Sistema de Gerenciamento para Colégio Militar
					
					<div id="login-box-name" style="margin-top: 20px;">Usuário:</div>
					<div id="login-box-field" style="margin-top: 20px;">
						<input id="j_username" type='text' name='j_username' class="validate[required] form-login " title="Username" value="" size="30" maxlength="2048"></input>
					</div>
				
					<div id="login-box-name">Senha:</div>
					<div id="login-box-field">
						<input id="j_password" type='password' name='j_password' class="validate[required] form-login" title="Password" value="" size="30" maxlength="2048"></input>
					</div>
					
<!-- 					<br />  -->
<!-- 					<span class="login-box-options">  -->
<!-- 						<input type="checkbox" name="1" value="1"></input> Lembra-se de mim   -->
<!-- 						<a id="esqueceuSenha" onclick="completaHref()" href="javascript:void(0)" style="margin-left: 30px;">Esqueci a senha?</a> -->
<!-- 					</span> -->
<!-- 					<br /> -->
					<br />
					
					<input class="btnAzul" value="Entrar" type="submit" />
			        <input class="btnAzul" style="margin-left: 2px;" type="reset" value="Limpar" onclick="$('#formID').validationEngine('hideAll');"/>
			        <br />
			        
			        <div style="color: OrangeRed; margin-top: 10px;" class="login-box-options"> 
						 <c:if test="${not empty param.login_error}">
							  <c:if test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'Bad credentials'}">Usuário ou senha incorreta.</c:if>
						      <c:if test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'User is disabled'}">Usuário desabilitado.</c:if>
						      <c:if test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'User account is locked'}">Conta do usuário bloqueada.</c:if>
						      <c:if test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'User account has expired'}">A conta do usuário expirou.</c:if> 
						      <c:if test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'User credentials have expired'}">As credenciais do usuário expiraram.</c:if>
						      <c:if test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'User credentials have expired'}">As credenciais do usuário expiraram.</c:if>
						      <c:if test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'No entity found for query'}">Usuário inexistente.</c:if>
					    </c:if>
					    <c:if test="${not empty param.lembrar_senha }">
					    	<c:out value="${param.lembrar_senha}"></c:out>
					    </c:if>
				    </div>
<!-- 				    <input type="button" class="btnAzulGrande"  value="Criar Cadastro no Banco de Talentos" onclick="criarCadastroBancoTalentos()"> -->
				</div><!-- fim div #login-box -->
				
			</form>
		</div>
	</body>
</html>